<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>3-Math随机点名</title>
	</head>
	<body>
		<script type="text/javascript">
			function getRandNumber(min,max){
				return Math.floor(Math.random() * (max - min + 1)) + min;
			}
			var y = getRandNumber(1,10);
			console.log(y);
			
			//随机点名
			var arr = ['李宝利','张端阳','王瑞祥','张猛','朱梦豪','缑王哲','樊文卓','王颖','赵可心'];
			
			console.log(arr[getRandNumber(0,8)]);
		</script>
	</body>
</html>
